<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%
    request.setCharacterEncoding("UTF-8");
    String htmlData = request.getParameter("content1") != null ? request.getParameter("content1") : "";
%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/argeeCommon.jsp" %>
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/againstAuditCommon.jsp" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    <script type="text/javascript" src="<%=path%>/My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="<%=path%>/HoganJS/handlebars-v4.0.11.js"></script>
    <link rel="stylesheet" type="text/css" href="<%=path%>/CSS/backLayout.css">
    <link rel="stylesheet" type="text/css" href="<%=path%>/CSS/bombBox.css">
    <style type="text/css">

        /**按钮样式**/
        .subtn1 {
            background: #57a0ff;
            border-radius: 50px;
            background: -webkit-linear-gradient(top, #57a0ff, #57a1ff);
            background: -moz-linear-gradient(top, #57a0ff, #57a1ff);
            background: linear-gradient(top, #57a0ff, #57a1ff);
            background: -ms-linear-gradient(top, #57a0ff, #57a1ff);
            border: 1px solid #2576A8;
            box-shadow: 0 1px 2px #8AC1E2 inset, 0 -1px 0 #57a0ff inset;
            color: #fff;
            height: 40px;
            text-shadow: 1px 1px 0.5px #22629B;
            outline: none;
        }

        .btn {
            background: #57a0ff;
            border-radius: 50px;
            background: -webkit-linear-gradient(top, #57a0ff, #57a1ff);
            background: -moz-linear-gradient(top, #57a0ff, #57a1ff);
            background: linear-gradient(top, #57a0ff, #57a1ff);
            background: -ms-linear-gradient(top, #57a0ff, #57a1ff);
            border: 1px solid #2576A8;
            box-shadow: 0 1px 2px #8AC1E2 inset, 0 -1px 0 #57a0ff inset;
            color: #fff;
            height: 40px;
            text-shadow: 1px 1px 0.5px #22629B;
            outline: none;
        }

        .subtn1:hover {
            background: -webkit-linear-gradient(top, #8DC9EF, #4E9FD1);
            background: -moz-linear-gradient(top, #8DC9EF, #4E9FD1);
            background: linear-gradient(top, #8DC9EF, #4E9FD1);
            background: -ms-linear-gradient(top, #8DC9EF, #4E9FD1);
        }

        .btn:hover {
            background: -webkit-linear-gradient(top, #8DC9EF, #4E9FD1);
            background: -moz-linear-gradient(top, #8DC9EF, #4E9FD1);
            background: linear-gradient(top, #8DC9EF, #4E9FD1);
            background: -ms-linear-gradient(top, #8DC9EF, #4E9FD1);
        }

        .modal-data1 {
            visibility: hidden;
            z-index: 1001;
            width: 1000px;
            min-height: 500px;
            margin: 100px auto;
            background-color: #FFFFFF;
            /* border: 1px solid #C80B14;*/
            -moz-box-shadow: 0 10px 20px #8AC1E2 inset, 0 -10px 0 #57a0ff inset;
            -webkit-box-shadow: 0 10px 20px #8AC1E2 inset, 0 -10px 0 #57a0ff inset;
            /*         box-shadow:0 0 10px #cccccc;
                    box-shadow: #cccccc; */
            box-shadow: 0 10px 20px #57a1ff inset, 0 -10px 0 #57a0ff inset;
            padding: 5px;
            text-align: center;
            position: fixed;
            left: 22%;
        }

        .modal-data1 td {
            padding-left: 15px;
            padding-right: 15px
        }

        .modal-data1 tr:FIRST-CHILD td {
            padding: 0px 10px;
        }

        .modal-data1 tr {
            padding-top: 30px
        }

        .modal-data1 form table {
            margin: 0px
        }

        input[type=checkbox] {
            padding: 0px;
            margin: 0px;
            text-align: right;
            width: 15px
        }

        .div_zilei {
            float: left;
            width: 600px;
            padding-left: 90px;
            height: 30px
        }

        .tr {
            height: 40px;
            background: #57a0ff;
            font-weight: 700
        }

        .tr td {
            font-size: 14px;
            color: #ffffff
        }

        .tr_td {
            height: 40px;
        }

        .tr_td td {
            border-bottom: 1px solid #ededed;
            text-align: center;
        }

        tr td:nth-child(1) {
            font-size: 14px;
            color: #cccccc
        }

        .date {
            border: 0;
            background: #ffffff;
            text-align: center;
        }

        .tr_td td:nth-child(1) {
            border-left: 1px solid #cccccc;
        }

        .addTable.deleteTable:HOVER {
            cursor: pointer;
        }

        .fseq {
            width: 37px;
            border: 0;
            text-align: center;
            color: #cccccc
        }

        .jczl {
            padding-left: 100px;
        }

        .div_tj {
            margin-top: 40px;
            padding-right: 60px;
        }

        td input {
            border: 0;
            background: #ffffff;
            text-align: center;
        }

        .remuneration1 {
            width: 150px;
            border: 0;
            background: #ffffff;
            text-align: center;
        }

        .loading {
            margin: 100px 450px;
            display: block;
            width: 65px;
            height: 65px;
            border: 1px solid #ddd;
            border-radius: 5px;
            opacity: .7;
            background: url(../images/loading.gif) no-repeat;
        }

        .botton {
            float: left;
            margin-left: 80px;

        }

        .botton span {
            width: 80px;

        }

        span input {
            width: 120px;
        }

        .findBtn1 {
            margin-left: 50px;
        }

        .div_input {
            width: 430px;
            float: left;
            line-height: 30px;
        }

        table input {
            width: 150px;
        }

        .gn_name {
            width: 150px;
        }

        #fbizdate {
            width: 120px;
        }

        li span {
            cursor: pointer;
        }

        .div_input input {
            width: 230px;
            height: 25px;
        }

        .div_zilei {
            width: 100%;
            padding-left: 90px;
            height: 30px
        }
        #px2{
            width: 40px;
        }
        #px3{
            width: 70px;
        }
        #px12{
            width: 100px;
        }
        .rcfcfwz {
            border: 0;
            background: #ffffff;
            text-align: center;
        }
        .rcfremark {
            border: 0;
            background: #ffffff;
            text-align: center;
        }

        .div_tj {
            margin-top: 40px;
            padding-right: 60px;
            width: 70%;
            height: 40px;
            float: left;
        }
        #recordinList{
            margin-bottom: 30px;
        }

    </style>
</head>
<body style="background: #f5f5f5">
<div class="main">

    <div class="weizhi">
        <c:if test="${recordin.cfbillstate == 3}">
            档案管理>>档案入库>>修改
        </c:if>
        <c:if test="${recordin.cfbillstate != 3}">
            档案管理>>档案入库>>查看
        </c:if>
    </div>
    <div class="div_body" style="box-shadow: 0 0 5px #cccccc;">

        <div id="modal-overlay">

        </div>

        <div class="modal-data1">
            <div style="height: 60px">
                <ul>
                    <li style="text-align: left;height: 40px;line-height: 40px">
                        <span style="margin-left: 30px;">名称：</span>
                        <span>
				  		 	<input class="name1" type="text">
				  		</span>
                        <span>电话号码：</span>
                        <span>
				  		 	<input class="cflxdh" type="text">
				  		</span>
                        <span style="margin-left: 30px;">开始时间：</span><span><input class="scinput1" name="beginTime"
                                                                                  type="text"
                                                                                  onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}',dateFmt:'yyyy-MM-dd'})"
                                                                                  id="datemin" class="input-text"
                                                                                  style="width:90px;"
                                                                                  value="${beginTime}"></span>
                        <span>结束时间：</span><span><input class="scinput1" name="endTime" type="text"
                                                       onfocus="WdatePicker({minDate:'#F{$dp.$D(\'datemin\')}',maxDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd'})"
                                                       id="datemax" class="input-text" style="width:90px;"
                                                       value="${endTime}"></span>
                        <span>
				  			<button class="findBtn1">
				  				查询
				  			</button>
				  		</span>
                    </li>
                </ul>
            </div>
            <div style="width:1000px; height:350px; overflow:scroll;">
                <form action="">
                    <table class="head1" id="studebntList" style="width: auto;white-space:nowrap;border-spacing:0px">
                        <c:if test="${!empty students}">
                            <tr style="background: #f2f2f2;height: 30px;line-height: 20px;" class="sel">
                                <th><input type="checkbox" id="all_Check"
                                           style="width: 15px;"/></th>
                                <th>名称</th>
                                <th>编码</th>
                                    <%--<th>描述</th>--%>
                                <th>创建时间</th>
                                <th>科目二合格时间</th>
                                <th>科目三合格时间</th>
                                <th>最后修改时间</th>
                                <th>用户名</th>
                                <th>别名</th>
                                <th>财务组织</th>
                                <th>身份证号码</th>
                                <th>出生日期</th>
                                <th>家庭住址</th>
                                <th>联系地址</th>
                                <th>暂住证号</th>
                                <th>手机</th>
                                <th>联系电话</th>
                                <th>邮政编码</th>
                                <th>申领类型</th>
                                <th>现准驾车型号</th>
                                <th>申请准驾车型号</th>
                                <th>入学日期</th>
                                <th>推荐人</th>
                                <th>班级</th>
                                <th>金额</th>
                            </tr>
                            <c:forEach items="${students}" var="student" varStatus="s">
                                <tr>
                                    <td class="fir"><input type="checkbox" class="check2" name="remuneration1"
                                                           style="width: 15px;"
                                                           value="${student.fid}"/></td>
                                    <td>${student.fnameL2}</td>
                                    <td>${student.fnumber}</td>
                                        <%--<td>${student.fdescriptionl2}</td>--%>
                                    <td>${student.fcreatetime}</td>
                                    <td>${student.cfkmehgrq}</td>
                                    <td>${student.cfkmshgrq}</td>
                                    <td>${student.flastupdatetime}</td>
                                    <td>${student.updateName}</td>
                                    <td>${student.updateName}</td>
                                    <td>${student.cfficompanyName}</td>
                                    <td>${student.cfidcardno}</td>
                                    <td>${student.cfbirthdays}</td>
                                    <td>${student.cfaddress}</td>
                                    <td>${student.cflinkaddress}</td>
                                    <td>${student.cfzzzh}</td>
                                    <td>${student.cfsjhm}</td>
                                    <td>${student.cflxdh}</td>
                                    <td>${student.cfcfwz}</td>
                                    <c:if test="${student.cfsllx eq 1}">
                                        <td>初次申领</td>
                                    </c:if>
                                    <c:if test="${student.cfsllx ne 1}">
                                        <td>增加准驾车型</td>
                                    </c:if>
                                    <c:choose>

                                        <c:when test="${student.cfxzjcxdh != 'NULL'}">
                                            <td>${student.cfxzjcxdh}</td>
                                        </c:when>

                                        <c:otherwise>
                                            <td></td>
                                        </c:otherwise>
                                    </c:choose>
                                    <td>${student.cfslzjcxdh}</td>
                                    <td>${student.fcreatetime}</td>
                                    <td>${student.cftjrName}</td>
                                    <td>${student.cfclazzName}</td>
                                    <td>${student.cfamount}元</td>
                                </tr>
                            </c:forEach>
                        </c:if>
                    </table>
                </form>
            </div>
            <div class="page" style="display: none;">
                <ul style="border-bottom: none;">
                    <li>
                        <span onclick="" class="indexPage">首页</span>
                        <span onclick="" class="prevPage">上一页</span>
                        <span onclick="" class="nextPage">下一页</span>
                        <span onclick="" class="endPage">尾页</span>
                        <input type="hidden" id="totalPage" value='${pb}'>
                        <input type="hidden" id="index" value="0">
                    </li>
                </ul>
            </div>

            <button class="subtn1" style="width: 150px;position: absolute;bottom: 35px;font-size: 16px;left: 250px">
                确定
            </button>
            <button class="btn" style="width: 150px;position: absolute;bottom: 35px;font-size: 16px;right: 250px">
                关闭
            </button>

        </div>
        <c:if test="${recordin.cfbillstate == 3}">
            <div class="div_form">
                <form id="update_recordin" action="<%=path%>/DrivingSys/update_recordin" onsubmit="StopRepeat()"
                      class="form" method="post">
                    <input id="fid" type="text" name="fid" style="visibility:hidden" value="${recordin.fid}"/>
                    <div class="jczl">
                        <div class="div_input">
                            <span class="gn_name">驾校&nbsp;:&nbsp;</span>
                            <input type="text" readonly="readonly" name="department" value="${department}"
                                   style="color: gray;">
                        </div>
                        <div class="div_input">
                            <span class="gn_name">单据编号&nbsp;:&nbsp;</span>
                            <input id="fnumber" type="text" name="fnumber" readonly="readonly"
                                   value="${recordin.fnumber}"
                                   style="color: gray;">
                        </div>
                        <div class="div_input">
                            <span class="gn_name">业务日期&nbsp;:&nbsp;</span>
                            <input type="text" id="fbizdate" value="${recordin.fbizdate}" name="fbizdate" style="width:190px;"
                                   onclick="WdatePicker({el:'fbizdate',dateFmt:'yyyy-MM-dd'})">
                            <img onclick="WdatePicker({el:'fbizdate',dateFmt:'yyyy-MM-dd'})"
                                 src="<%=path%>/image/date.jpg" align="absmiddle" style="padding-left: 15px">
                        </div>
                        <div class="div_input">
                            <span class="gn_name">参考消息&nbsp;:&nbsp;</span>
                            <input id="fsimplename" type="text" name="fdescription" value="${recordin.fdescription}">
                        </div>
                        <div class="div_input">
                            <span class="gn_name">单据状态&nbsp;:&nbsp;</span>
                            <input value="保存"
                                   readonly="readonly" id="gs">
                            <input style="display: none" id="fdescriptionL2" type="text" name="cfbillstate" value="3"
                                   readonly="readonly" id="gs">
                        </div>

                        <div class="div_zilei">
                            <div style="width: 65%;text-align: right;">
                                <img src="<%=path%>/image/insert2323.jpg" class="copyDate">
                                <span style="padding-right: 20px;color: #57a0ff;font-weight: 700;font-size: 14px"
                                      class="copyDate">复制</span>
                                <img src="<%=path%>/image/insert2323.jpg" class="addTable">
                                <span style="padding-right: 20px;color: #57a0ff;font-weight: 700;font-size: 14px"
                                      class="addTable" onclick="clickadd()">添加</span>
                                <img src="<%=path%>/image/delete212.png" class="deleteTable">
                                <span class="deleteTable" style="color: #57a0ff;font-weight: 700;font-size: 14px"
                                      class="deleteTable">删除</span>
                            </div>
                        </div>
                        <div style="float: left; overflow:auto;height: 360px; width: 88%; margin-bottom: 40px;">
                            <table id="recordinList"
                                   style="min-height:30px;overflow:auto;border-spacing:0; width: 70%">
                                <tr class="tr">
                                    <td width="20px" align="right" style="padding-left: 5px"><%--<input type="checkbox"
                                                                                                    name="check"
                                                                                                    class="check"
                                                                                                    style="width: 15px;">--%>
                                    </td>

                                    <td align="center">学员</td>
                                    <td align="center">学员编号</td>
                                    <td align="center">身份证号码</td>
                                    <td align="center">车型</td>
                                    <td align="center">性别</td>
                                    <td align="center">手机号码</td>
                                    <td align="center">结业时间</td>
                                    <td align="center">结业证编号</td>
                                    <td align="center">发证时间</td>
                                </tr>
                                <c:forEach items="${recordinentryList}" var="recordinentry" varStatus="s">
                                    <tr align="left" class="tr_td">

                                        <td style="width: 20px;">
                                            <input class='check2' type="checkbox" name="check2"
                                                   style="width:15px">
                                            <input type="hidden" name="rfid" value="${recordinentry.fid}"/>
                                        </td>
                                        </td>
                                        <td class="rstuname" style="display: none;width: 20px;">
                                            <input type="text" readonly="readonly" name="rstuname"
                                                   value="${recordinentry.stuname}"/>
                                        </td>

                                        <td class="name">
                                            <input type="text" readonly="readonly" class="remuneration1"
                                                   name="username_v" id="px3"
                                                   value="${recordinentry.username_v}"<%-- onclick="clickName($(this))"--%>
                                            >
                                        </td>
                                        <td>
                                            <input type="text" readonly="readonly" name="rcfstudentno" class="text"
                                                   value="${recordinentry.cfstudentno}" readonly="readonly"/>
                                        </td>
                                        <td>
                                            <input type="text" readonly="readonly" name="rcfidcardno" class="text"
                                                   value="${recordinentry.cfidcardno}" readonly="readonly"/></td>
                                        <td>
                                            <input type="text" readonly="readonly" name="rcfcartype" id="px2" class="text"
                                                   value="${recordinentry.cfcartype}" readonly="readonly"/></td>
                                        <td>
                                            <c:if test="${recordinentry.cfsex eq 1}">
                                                <input type="text" class="text" id="px2"
                                                       value="男" readonly="readonly"/>
                                                <input type="hidden" name="rcfsex" class="text"
                                                       value="1"/>
                                            </c:if>
                                            <c:if test="${recordinentry.cfsex ne 1}">
                                                <input type="text" class="text" id="px2"
                                                       value="女" readonly="readonly"/>
                                                <input type="hidden" name="rcfsex" class="text"
                                                       value="2"/>
                                            </c:if>

                                        </td>
                                        <td>
                                            <input type="text" readonly="readonly" name="rcfsjhm" class="text"
                                                   id="px12"  value="${recordinentry.cfsjhm}"/></td>
                                        <td>
                                            <input type="text" id="rcfcfwz${recordinentry.fid}" name="rcfcfwz"
                                                   class="rcfcfwz"
                                                   value="${recordinentry.cfcfwz}"
                                                   onclick="WdatePicker({el:'rcfcfwz${recordinentry.fid}',dateFmt:'yyyy年MM月dd日'})"/>
                                        </td>
                                        <td>
                                            <input type="text" name="rcfjyzbh" class="rcfjyzbh"
                                                   value="${recordinentry.cfjyzbh}"/></td>
                                        <td>
                                            <input type="text" id="rcfremark${recordinentry.fid}" name="rcfremark"
                                                   class="rcfremark"
                                                   value="${recordinentry.cfremark}"
                                                   onclick="WdatePicker({el:'rcfremark${recordinentry.fid}',dateFmt:'yyyy年MM月dd日'})"/>
                                        </td>
                                    </tr>
                                </c:forEach>
                            </table>
                        </div>
                    </div>
                    <div style="line-height:31px; padding-top: 20px; height: 31px; ">
                        <div class="botton">
                            <span class="gn_name">审核人&nbsp;:&nbsp;</span>
                            <input id="shename" readonly="readonly" type="text" name="ffivouchered"
                                   value="${recordin.checkName}">
                        </div>
                        <div class="botton">
                            <span class="gn_name">创建人&nbsp;:&nbsp;</span>
                            <input id="createname" readonly="readonly" type="text" name="createName"
                                   value="${recordin.createName}">
                        </div>
                        <div class="botton">
                            <span class="gn_name">创建时间&nbsp;:&nbsp;</span>
                            <input id="updatetime" readonly="readonly" type="text" name="fcreatetime"
                                   value="${recordin.fcreatetime}">
                        </div>
                    </div>
                    <div class="div_tj">
                        <shiro:hasPermission name="/update_recordin">
                            <div>
                                <input type="button" class="input_submit bc" value="" onclick="audit(2)">
                            </div>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="/submitRecordin">
                            <div>
                                <input type="button" class="input_submit tj" value="" onclick="submitTj()"/>
                            </div>
                        </shiro:hasPermission>
                        <div>
                            <input type="button" class="input_submit cklc" value=""
                                   onclick="lookActivitiImg('publicProcess',$('#fnumber').val())">
                        </div>
                        <div>
                            <input type="button" class="input_back fh" value=""
                                   onclick="back()"/>
                        </div>
                    </div>
                </form>
            </div>
        </c:if>
        <c:if test="${recordin.cfbillstate == 4 }">
            <div class="div_form">
                <form id="update_recordin" action="<%=path%>/DrivingSys/update_recordin" class="form" method="post">
                    <input id="fid" type="text" name="fid" style="visibility:hidden" value="${recordin.fid}"/>
                    <div class="jczl">
                        <div class="div_input">
                            <span class="gn_name">驾校&nbsp;:&nbsp;</span>
                            <input type="text" readonly="readonly" name="department" value="${department}"
                                   style="color: gray;">
                        </div>
                        <div class="div_input">
                            <span class="gn_name">单据编号&nbsp;:&nbsp;</span>
                            <input id="fnumber" type="text" name="fnumber" readonly="readonly"
                                   value="${recordin.fnumber}"
                                   style="color: gray;">
                        </div>
                        <div class="div_input">
                            <span class="gn_name">业务日期&nbsp;:&nbsp;</span>
                            <input style="color: gray;" type="text" id="fbizdate" style="width:190px;"
                                   value="${recordin.fbizdate}" name="fbizdate"
                                   readonly="readonly">
                            <img
                                    src="<%=path%>/image/date.jpg" align="absmiddle" style="padding-left: 15px">
                        </div>
                        <div class="div_input">
                            <span class="gn_name">参考消息&nbsp;:&nbsp;</span>
                            <input style="color: gray;" id="fsimplename" type="text" readonly='readonly'
                                   name="fdescription" value="${recordin.fdescription}">
                        </div>
                        <div class="div_input">
                            <span class="gn_name">单据状态&nbsp;:&nbsp;</span>
                            <input style="color: gray;" value="提交"
                                   readonly="readonly" id="gs">
                            <input style="display: none" id="fdescriptionL2" type="text" name="cfbillstate"
                                   value="4"
                                   readonly="readonly" id="gs">
                        </div>

                            <%-- <div class="div_zilei">
                                 <div style="width: 380px;text-align: right;float: left;">
                                     <img src="<%=path%>/image/insert2323.jpg" class="addTable">
                                     <span  style="padding-right: 20px;color: #a9bbe0;font-size: 14px"
                                           class="addTable" onclick="clickadd()">添加</span>
                                     <img src="<%=path%>/image/delete212.png" class="deleteTable">
                                     <span class="deleteTable" style="color: #a9bbe0;font-size: 14px"
                                           class="deleteTable">删除</span>
                                 </div>
                             </div>--%>
                        <div style="float: left; overflow:auto;height: 360px; width: 88%; margin-bottom: 40px;">
                            <table id="recordinList"
                                   style="min-height:30px;overflow:auto;border-spacing:0; width: 70%">
                                <tr class="tr">
                                    <td width="20px" align="right" style="padding-left: 5px"><%--<input type="checkbox"
                                                                                                    name="check"
                                                                                                    class="check"
                                                                                                    style="width: 15px;">--%>
                                    </td>

                                    <td align="center">学员</td>
                                    <td align="center">学员编号</td>
                                    <td align="center">身份证号码</td>
                                    <td align="center">车型</td>
                                    <td align="center">性别</td>
                                    <td align="center">手机号码</td>
                                    <td align="center">结业时间</td>
                                    <td align="center">结业证编号</td>
                                    <td align="center">发证时间</td>
                                </tr>
                                <c:forEach items="${recordinentryList}" var="recordinentry" varStatus="s">
                                    <tr align="left" class="tr_td">
                                        <td width='20px' align='center'><%--<input class='check2' type="checkbox"
                                                                               name="check2"
                                                                               style="width:15px">--%>
                                        </td>
                                        <td style="display: none;width: 20px;">
                                            <input type="text" name="rfid" value="${recordinentry.fid}"/>
                                        </td>
                                        <td class="rstuname" style="display: none;width: 20px;">
                                            <input type="text" name="rstuname" value="${recordinentry.stuname}"/>
                                        </td>

                                        <td class="name">
                                            <input type="text" class="remuneration1" id="px3"
                                                   name="username_v" readonly="readonly"
                                                   value="${recordinentry.username_v}" <%--onclick="clickName($(this))"--%>
                                            >
                                        </td>
                                        <td>
                                            <input type="text" name="rcfstudentno" class="text"
                                                   value="${recordinentry.cfstudentno}" readonly="readonly"/>
                                        </td>
                                        <td>
                                            <input type="text" name="rcfidcardno" class="text"
                                                   value="${recordinentry.cfidcardno}" readonly="readonly"/></td>
                                        <td>
                                            <input type="text" name="rcfcartype" class="text" id="px2"
                                                   value="${recordinentry.cfcartype}" readonly="readonly"/></td>
                                        <td>
                                            <c:if test="${recordinentry.cfsex eq 1}">
                                                <input type="text" class="text" id="px2"
                                                       value="男" readonly="readonly"/>
                                                <input type="hidden" name="rcfsex" class="text"
                                                       value="1"/>
                                            </c:if>
                                            <c:if test="${recordinentry.cfsex ne 1}">
                                                <input type="text" class="text" id="px2"
                                                       value="女" readonly="readonly"/>
                                                <input type="hidden" name="rcfsex" class="text"
                                                       value="2"/>
                                            </c:if>

                                        </td>
                                        <td>
                                            <input readonly="readonly" type="text" name="rcfsjhm" class="text"
                                                   value="${recordinentry.cfsjhm}"/></td>
                                        <td>
                                            <input type="text" id="rcfcfwz${recordinentry.fid}"
                                                   name="rcfcfwz" class="rcfcfwz" readonly="readonly"
                                                   value="${recordinentry.cfcfwz}"
                                            />
                                        </td>
                                        <td>
                                            <input readonly="readonly" type="text" name="rcfjyzbh" class="rcfjyzbh"
                                                   value="${recordinentry.cfjyzbh}"/></td>
                                        <td>
                                            <input type="text" id="rcfremark${recordinentry.fid}"
                                                   name="rcfremark"
                                                   class="rcfremark"
                                                   value="${recordinentry.cfremark}" readonly="readonly"
                                            />
                                        </td>
                                    </tr>
                                </c:forEach>
                            </table>
                        </div>
                    </div>
                    <div style="line-height:31px; padding-top: 20px; height: 31px;">
                        <div class="botton">
                            <span class="gn_name">审核人&nbsp;:&nbsp;</span>
                            <input style="color: gray;" id="shename" readonly="readonly" type="text"
                                   name="ffivouchered"
                                   value="${recordin.checkName}">
                        </div>
                        <div class="botton">
                            <span class="gn_name">创建人&nbsp;:&nbsp;</span>
                            <input style="color: gray;" id="createname" readonly="readonly"
                                   type="text" name="createName"
                                   value="${recordin.createName}">
                        </div>
                        <div class="botton">
                            <span class="gn_name">创建时间&nbsp;:&nbsp;</span>
                            <input style="color: gray;" id="updatetime" readonly="readonly"
                                   type="text" name="fcreatetime"
                                   value="${recordin.fcreatetime}">
                        </div>
                    </div>
                    <div class="div_tj">
                        <c:if test="${AuditState == 'true'}">
                            <shiro:hasPermission name="/auditRecordin">
                                <div>
                                    <input type="button" class="input_submit sh" value="" onclick="examine(5)"/>
                                </div>
                            </shiro:hasPermission>
                        </c:if>
                        <shiro:hasPermission name="/againstAuditRecordin">
                            <div>
                                <input type="button" class="input_submit fsh" value="" onclick="examine(3)"/>
                            </div>
                        </shiro:hasPermission>
                        <div>
                            <input type="button" class="input_submit cklc" value=""
                                   onclick="lookActivitiImg('publicProcess',$('#fnumber').val())">
                        </div>
                        <div>
                            <input type="button" class="input_back fh" value=""
                                   onclick="back()"/>
                        </div>
                    </div>
                </form>
            </div>
        </c:if>
        <c:if test="${recordin.cfbillstate == 5 }">
            <div class="div_form">
                <form id="update_recordin" action="<%=path%>/DrivingSys/update_recordin" class="form" method="post">
                    <input id="fid" type="text" name="fid" style="visibility:hidden" value="${recordin.fid}"/>
                    <div class="jczl">
                        <div class="div_input">
                            <span class="gn_name">驾校&nbsp;:&nbsp;</span>
                            <input type="text" readonly="readonly" name="department" value="${department}"
                                   style="color: gray;">
                        </div>
                        <div class="div_input">
                            <span class="gn_name">单据编号&nbsp;:&nbsp;</span>
                            <input id="fnumber" type="text" name="fnumber" readonly="readonly"
                                   value="${recordin.fnumber}"
                                   style="color: gray;">
                        </div>
                        <div class="div_input">
                            <span class="gn_name">业务日期&nbsp;:&nbsp;</span>
                            <input style="color: gray;" type="text" id="fbizdate" style="width:190px;"
                                   value="${recordin.fbizdate}" name="fbizdate"
                                   readonly="readonly">
                            <img
                                    src="<%=path%>/image/date.jpg" align="absmiddle" style="padding-left: 15px">
                        </div>
                        <div class="div_input">
                            <span class="gn_name">参考消息&nbsp;:&nbsp;</span>
                            <input style="color: gray;" id="fsimplename" type="text" readonly="readonly"
                                   name="fdescription" value="${recordin.fdescription}">
                        </div>
                        <div class="div_input">
                            <span class="gn_name">单据状态&nbsp;:&nbsp;</span>
                            <input style="color: gray;" value="审核"
                                   readonly="readonly" id="gs">
                            <input style="display: none" id="fdescriptionL2" type="text" name="cfbillstate"
                                   value="5"
                                   readonly="readonly" id="gs">
                        </div>

                            <%-- <div class="div_zilei">
                                 <div style="width: 380px;text-align: right;float: left;">
                                     <img src="<%=path%>/image/insert2323.jpg" class="addTable">
                                     <span  style="padding-right: 20px;color: #a9bbe0;font-size: 14px"
                                           class="addTable" onclick="clickadd()">添加</span>
                                     <img src="<%=path%>/image/delete212.png" class="deleteTable">
                                     <span class="deleteTable" style="color: #a9bbe0;font-size: 14px"
                                           class="deleteTable">删除</span>
                                 </div>
                             </div>--%>
                        <div style="float: left; overflow:auto;height: 360px; width: 88%; margin-bottom: 40px;">
                            <table id="recordinList"
                                   style="min-height:30px;overflow:auto;border-spacing:0; width: 70%">
                                <tr class="tr">
                                    <td width="20px" align="right" style="padding-left: 5px"><%--<input type="checkbox"
                                                                                                    name="check"
                                                                                                    class="check"
                                                                                                    style="width: 15px;">--%>
                                    </td>

                                    <td align="center">学员</td>
                                    <td align="center">学员编号</td>
                                    <td align="center">身份证号码</td>
                                    <td align="center">车型</td>
                                    <td align="center">性别</td>
                                    <td align="center">手机号码</td>
                                    <td align="center">结业时间</td>
                                    <td align="center">结业证编号</td>
                                    <td align="center">发证时间</td>
                                </tr>
                                <c:forEach items="${recordinentryList}" var="recordinentry" varStatus="s">
                                    <tr align="left" class="tr_td">
                                        <td width='20px' align='center'><%--<input class='check2' type="checkbox"
                                                                               name="check2"
                                                                               style="width:15px">--%>
                                        </td>
                                        <td style="display: none;width: 20px;">
                                            <input type="text" name="rfid" value="${recordinentry.fid}"/>
                                        </td>
                                        <td class="rstuname" style="display: none;width: 20px;">
                                            <input type="text" name="rstuname" value="${recordinentry.stuname}"/>
                                        </td>

                                        <td class="name">
                                            <input type="text" class="remuneration1" id="px3"
                                                   name="username_v" readonly="readonly"
                                                   value="${recordinentry.username_v}" <%--onclick="clickName($(this))"--%>
                                            >
                                        </td>
                                        <td>
                                            <input type="text" name="rcfstudentno" class="text"
                                                   value="${recordinentry.cfstudentno}" readonly="readonly"/>
                                        </td>
                                        <td>
                                            <input type="text" name="rcfidcardno" class="text"
                                                   value="${recordinentry.cfidcardno}" readonly="readonly"/></td>
                                        <td>
                                            <input type="text" name="rcfcartype" class="text" id="px2"
                                                   value="${recordinentry.cfcartype}" readonly="readonly"/></td>
                                        <td>
                                            <c:if test="${recordinentry.cfsex eq 1}">
                                                <input type="text" class="text" id="px2"
                                                       value="男" readonly="readonly"/>
                                                <input type="hidden" name="rcfsex" class="text"
                                                       value="1"/>
                                            </c:if>
                                            <c:if test="${recordinentry.cfsex ne 1}">
                                                <input type="text" class="text" id="px2"
                                                       value="女" readonly="readonly"/>
                                                <input type="hidden" name="rcfsex" class="text"
                                                       value="2"/>
                                            </c:if>

                                        </td>
                                        <td>
                                            <input readonly="readonly" type="text" name="rcfsjhm" class="text"
                                                   value="${recordinentry.cfsjhm}"/></td>
                                        <td>
                                            <input type="text" id="rcfcfwz${recordinentry.fid}"
                                                   name="rcfcfwz" class="text" readonly="readonly"
                                                   value="${recordinentry.cfcfwz}"
                                            />
                                        </td>
                                        <td>
                                            <input readonly="readonly" type="text" name="rcfjyzbh" class="text"
                                                   readonly="readonly"
                                                   value="${recordinentry.cfjyzbh}"/></td>
                                        <td>
                                            <input type="text" id="rcfremark${recordinentry.fid}"
                                                   name="rcfremark"
                                                   class="text"
                                                   value="${recordinentry.cfremark}" readonly="readonly"
                                            />
                                        </td>
                                    </tr>
                                </c:forEach>
                            </table>
                        </div>
                    </div>
                    <div style="line-height:31px; padding-top: 20px; height: 31px;">
                        <div class="botton">
                            <span class="gn_name">审核人&nbsp;:&nbsp;</span>
                            <input style="color: gray;" id="shename" readonly="readonly" type="text"
                                   name="ffivouchered"
                                   value="${recordin.checkName}">
                        </div>
                        <div class="botton">
                            <span class="gn_name">创建人&nbsp;:&nbsp;</span>
                            <input style="color: gray;" id="createname" readonly="readonly"
                                   type="text" name="createName"
                                   value="${recordin.createName}">
                        </div>
                        <div class="botton">
                            <span class="gn_name">创建时间&nbsp;:&nbsp;</span>
                            <input style="color: gray;" id="updatetime" readonly="readonly"
                                   type="text" name="fcreatetime"
                                   value="${recordin.fcreatetime}">
                        </div>
                    </div>
                    <div class="div_tj">
                        <shiro:hasPermission name="/againstAuditRecordin">
                            <div>
                                <input type="button" class="input_submit fsh" value="" onclick="examine(3)"/>
                            </div>
                        </shiro:hasPermission>
                        <div>
                            <input type="button" class="input_submit cklc" value=""
                                   onclick="lookActivitiImg('publicProcess',$('#fnumber').val())">
                        </div>
                        <div>
                            <input type="button" class="input_back fh" value=""
                                   onclick="back()"/>
                        </div>
                    </div>
                </form>
            </div>
        </c:if>
    </div>
</div>
</body>
<script type="text/javascript" src="<%=path%>/JQuery/jquery-1.8.2.js"></script>
<script type="text/javascript" src="<%=path%>/JS/tempJs/fomatDate.js"></script>
<script id="table-template" type="text/x-handlebars-template">
    {{#isNull sList}}
    <tr style="background: #f2f2f2;height: 30px;line-height: 20px;" class="sel">
        <th style="width: 20px"><input type="checkbox" id="all_Check"
                                       style="width: 15px;"/></th>
        <th>名称</th>
        <th>编码</th>
        <th>描述</th>
        <th>创建时间</th>
        <th>科目二合格时间</th>
        <th>科目三合格时间</th>
        <th>最后修改时间</th>
        <th>用户名</th>
        <th>别名</th>
        <th>财务组织</th>
        <th>身份证号码</th>
        <th>出生日期</th>
        <th>家庭住址</th>
        <th>联系地址</th>
        <th>暂住证号</th>
        <th>手机</th>
        <th>联系电话</th>
        <th>邮政编码</th>
        <th>申领类型</th>
        <th>现准驾车型号</th>
        <th>申请准驾车型号</th>
        <th>入学日期</th>
        <th>推荐人</th>
        <th>班级</th>
        <th>金额</th>
    </tr>
    {{#each sList}}
    <tr>
        <td style="display: none;width: 20px;"><input type="text" class="fseq" name="fid" value="{{fid}}"
        ></td>
        <td class="fir"><input type="checkbox" class="check2" value="{{fid}}" name="remuneration1"/></td>
        <td>{{fnameL2}}</td>
        <td>{{fnumber}}</td>
        <td>{{fdescriptionl2}}</td>
        <td>{{fcreatetime}}</td>
        <td>{{cfkmehgrq}}</td>
        <td>{{cfkmshgrq}}</td>
        <td>{{flastupdatetime}}</td>
        <td>{{updateName}}</td>
        <td>{{updateName}}</td>
        <td>{{cfficompanyName}}</td>
        <td>{{cfidcardno}}</td>
        <td>{{cfbirthdays}}</td>
        <td>{{cfaddress}}</td>
        <td>{{cflinkaddress}}</td>
        <td>{{cfzzzh}}</td>
        <td>{{cfsjhm}}</td>
        <td>{{cflxdh}}</td>
        <td>{{cfcfwz}}</td>
        {{#compare cfsllx 1}}
        <td>初次申领</td>
        {{else}}
        <td>增加准驾车型</td>
        {{/compare}}
        {{#compare cfxzjcxdh 'NULL'}}
        <td></td>
        {{else}}
        <td>{{cfxzjcxdh}}</td>
        {{/compare}}
        <td>{{cfslzjcxdh}}</td>
        <td>{{fcreatetime}}</td>
        <td>{{cftjrName}}</td>
        <td>{{cfclazzName}}</td>
        <td>{{cfamount}}</td>
    </tr>
    {{/each}}
    {{else}}
    <td>没有搜索到您想要的内容!</td>
    {{/isNull}}

</script>
<script id="table-template1" type="text/x-handlebars-template">
    {{#each studentsNameList}}
    <tr align="left" class="tr_td">
        <td style="display: none;width: 20px;">
            <input type="text" name="rfid" value=""/>
        </td>
        <td class="rstuname" style="display: none;width: 20px;">
            <input type="text" name="rstuname" value='{{fid}}'/>
        </td>
        <td width='20px' align='center' class="fir"><input class='check2' type="checkbox" name="check2"
                                                           style="width:15px">
        </td>
        <td class="name">
            <input type="text" class="remuneration1" id="px3" name="username_v" readonly="readonly"
                   value="{{fnameL2}}">
        </td>
        <%--<td class="name">
            <input type="text" class="remuneration1" name="username_v"
                   value="{{fnameL2}}" onclick="clickName($(this))" >
        </td>--%>
        <td>
            <input type="text" name="rcfstudentno" readonly="readonly" class="text"
                   value="{{fnumber}}"/>
        </td>
        <td>
            <input type="text" name="rcfidcardno" readonly="readonly" class="text"
                   value="{{cfidcardno}}"/></td>
        <td>
            <input type="text" name="rcfcartype" id="px2" readonly="readonly" class="text"
                   value="{{cfslzjcxdh}}"/></td>
        {{#compare cfsex 1}}
        <td>
            <input type="text" name="" class="text" id="px2" readonly="readonly"
                   value="男"/></td>
        <input type="hidden" name="rcfsex" class="text"
               value="1"/></td>
        {{else}}
        <td>
            <input type="text" name="" class="text" id="px2" readonly="readonly"
                   value="女"/></td>
        <input type="hidden" name="rcfsex" class="text"
               value="2"/></td>
        {{/compare}}
        <td>
            <input type="text" name="rcfsjhm" id="px12" class="text" readonly="readonly"
                   value="{{cfsjhm}}"/></td>
        <td>
            <input type="text" id="rcfcfwz{{fid}}{{RndNum}}" name="rcfcfwz" class="rcfcfwz"
                   value="{{compareofsize cfkmehgrq cfkmshgrq}}" onchange="changeName($(this))"
                   onclick="WdatePicker({el:'rcfcfwz{{fid}}{{RndNum}}',dateFmt:'yyyy-MM-dd'})"/>
        </td>
        <td>
            <input type="text" name="rcfjyzbh" class="text rcfjyzbh" onchange="changeName($(this))"
                   value=""/></td>
        <td>
            <input type="text" id="rcfremark{{fid}}{{RndNum}}" name="rcfremark" class="rcfremark"
                   value="{{dateAdd cfkmehgrq cfkmshgrq 3}}" onchange="changeName($(this))"
                   onclick="WdatePicker({el:'rcfremark{{fid}}{{RndNum}}',dateFmt:'yyyy-MM-dd'})"/>
        </td>
    </tr>
    {{/each}}
</script>
<script>
    //弹出框模版文件
    var myTemplate = Handlebars.compile($("#table-template").html());
    //回填数据模版文件
    var myTemplate1 = Handlebars.compile($("#table-template1").html());
    //删除时候的数组
    var updateid = new Array();
    //处理删除时候的this缓存
    var _this;
    //判断当前操作使增加还是删除
    var stu;
    //返回的当前选中的元素序号
    var feq;
    //元素更新标示
    var updata;

    //打开模式窗口
    $(".addTable").click(function () {

        $('#modal-overlay').css('visibility', 'visible')
        $('.modal-data1').css('visibility', 'visible')
        $('input:checkbox').removeAttr('checked');
        $('.page').show();

        stateint = parseInt(Math.random() * 200, 10)
    })


    //选中的删除
    $(".deleteTable").click(function () {
        var tr_len = $("#recordinList tr").length;
            var s = '';
            $('input:checkbox[name=check2]').each(function (i) {

                if ($(this).is('.check2:checked')) {

                    $(this).parent().parent().remove();
                    myTemplate1html = "";
                    s = '1';
                }
            })

            //判断是否选中
            if (s == null || s == '') {
                alert("请选择一条数据删除");
                return false;
            }
    })

    function changeName(_this) {
        _this.attr('value', _this.val())
    }
    //注册一个比较大小的Helper,判断v1是否大于v2
    Handlebars.registerHelper("dateAdd", function (dataStr1,dataStr2, dayCount) {
        //日期加天数的方法
        //dataStr日期字符串
        //dayCount 要增加的天数
        //return 增加n天后的日期字符串
        if (dataStr1 > dataStr2) {
            return dateAddDays(dataStr1, dayCount);
        }
        else{
            return dateAddDays(dataStr2, dayCount);
        }
    });

    //注册一个比较大小的Helper,判断v1是否大于v2
    Handlebars.registerHelper("compareofsize", function (v1, v2) {
        if (v1 > v2) {
            return v1;
        } else {
            return v2;
        }
    });

    //注册一个比较大小的Helper,判断v1是否等于v2
    Handlebars.registerHelper("compare", function (v1, v2, options) {
        if (v1 == v2) {
            //满足添加继续执行
            return options.fn(this);
        } else {
            //不满足条件执行{{else}}部分
            return options.inverse(this);
        }
    });
    //注册一个比较内容是否为空
    Handlebars.registerHelper("isNull", function (v1, options) {
        if (v1 != "") {
            //满足添加继续执行
            return options.fn(this);
        } else {
            //不满足条件执行{{else}}部分
            return options.inverse(this);
        }
    });
    //注册索引+1的helper
    Handlebars.registerHelper("addOne", function (index) {
        //返回+1之后的结果
        //判断当前选中的元素

        //返回当前元素的序列号
        if (updata == 20) {
            updata = 0;
            return feq;
        }

        var tr_len = $("#recordinList .tr_td").length + 1;

        return tr_len + index;

    });

    var stateint = 0;
    Handlebars.registerHelper("RndNum", function () {
        return stateint;

    });


    //设置全选功选
    $(document).on('click', '.check', function (e) {
        if ($(this).attr("checked")) {
            $(".check2:checkbox").prop("checked", true)
        } else {
            $('.check2:checkbox').removeAttr('checked')
        }
    })

    var _state;

    //改变审核状态
    function audit(state) {
        if ($('#fbizdate').val() == "") {
            alert('业务日期项不能为空 ！')
            return false;
        }
        if ($('#update_recordin').find("tr").length == 1) {
            alert('请至少选择一条数据！')
            return false;
        }
        //改变单据状态
        $("#fdescriptionL2").val(state);
        //写入审核人标记
        $("#shename").val(state);
        $('#update_recordin').submit()
    }

    function submitTj() {

        $.messager.confirm('提示', '是否提交,提交后不会改变修改后的值', function (r) {

            if (r) {
                $.ajax({
                    url: '<%=path%>/DrivingSys/queryRecordinSubmit',
                    type: "post",
                    data: {
                        'fid': $('#fid').val(),
                        'fnumber': $('#fnumber').val()
                    },
                    dataType: "json",
                    success: function (res) {
                        showAlert(res.msg, 'queryRecordin/look.action?state=first');
                    },
                    error: function () {
                        alert('错误');
                    }
                })
            }
        });


    }

    $('#auditsubmit').click(function () {

        var rcfcfwz = new Array();
        var rcfjyzbh = new Array();
        var rcfremark = new Array();

        $('.rcfcfwz').each(function (i) {
            rcfcfwz[i] = $(this).val();
        })
        $('.rcfjyzbh').each(function (i) {
            rcfjyzbh[i] = $(this).val();
        })
        $('.rcfremark').each(function (i) {
            rcfremark[i] = $(this).val();
        })

        $('.auditcheck').each(function () {

            if ($(this).is(':checked')) {
                $.ajax({
                    url: '<%=path%>/DrivingSys/queryRecordinExamine',
                    type: "post",
                    data: {
                        'fid': $('#fid').val(),
                        'state': _state,
                        'fnumber': $('#fnumber').val(),
                        'agreed': $(this).val(),
                        'auditcomment': $('#auditcomment').val(),
                        'rcfcfwz': rcfcfwz,
                        'rcfjyzbh': rcfjyzbh,
                        'rcfremark': rcfremark
                    },
                    dataType: "json",
                    success: function (res) {
                        showAlert(res.msg, 'queryRecordin/look.action?state=first');
                    },
                    error: function () {
                        alert('错误');
                    }
                })
            } else {

            }
        })
    })
    //反审核按钮
    $('#againstAuditsubmit').click(function () {
        $.ajax({
            url: '<%=path%>/DrivingSys/queryRecordinExamine',
            type: "post",
            data: {
                'fid': $('#fid').val(),
                'state': _state,
                'fnumber': $('#fnumber').val(),
                'auditcomment': $('#againstAuditcomment').val()
            },
            dataType: "json",
            success: function (res) {
                showAlert(res.msg, 'queryRecordin/look.action?state=first');
            },
            error: function () {
                alert('错误');
            }
        })
    })

    function examine(state) {
        _state = state;
        if (state == 5) {
            $('#modal-overlay').css('visibility', 'visible')
            $('.modal-data9').css('visibility', 'visible')
        }
        else if (state == 3) {
            $('#modal-overlay').css('visibility', 'visible')
            $('.modal-data10').css('visibility', 'visible')
        }
    }

    //弹出模式框
    function clickName(e) {
        $(".addTable").click();
        _this = e.parent().parent();
        stu = 20;
        updata = 20;
    }

    function clickadd() {
        updata = 0;
    }

    $('.positiongrade2').click(function () {
        $('#modal-overlay').css('visibility', 'visible')
        $('.modal-data2').css('visibility', 'visible')
        $('input:checkbox').removeAttr('checked');
    })
    //关闭模式窗口
    $('.btn').click(function () {
        $('#modal-overlay').css('visibility', 'hidden')
        $('.modal-data').css('visibility', 'hidden')
        $('.modal-data1').css('visibility', 'hidden')
        $('.modal-data2').css('visibility', 'hidden')
        $('.modal-data9').css('visibility', 'hidden')
        $('.modal-data10').css('visibility', 'hidden')
        $('input:checkbox').removeAttr('checked');
    })

    var htmlhead = ""
    //把选中的信息名称填充到输入框中
    $('.subtn1').click(function () {
        var spCodesTemp = "";
        $('input:checkbox[name=remuneration1]:checked').each(function (i) {
            if (0 == i) {
                //把学生id增加到字表中
                spCodesTemp = $(this).val();

            } else {
                spCodesTemp += ("," + $(this).val());

            }
        });
        $.ajax({
            url: '<%=path%>/DrivingSys/selStudentsByFid',
            type: "post",
            data: {'id': spCodesTemp},
            dataType: "json",
            success: function (res) {

                if (res.studentsNameList == "") {
                    alert('请选择学员信息！');
                    return false;
                }

                if (stu == 20) {
                    _this.remove();
                    feq = _this.find('.fseq').val();
                }

                htmlhead = $('#recordinList').html();
                $('#recordinList').html(htmlhead + myTemplate1(res));
                $('#modal-overlay').css('visibility', 'hidden')
                $('.modal-data1').css('visibility', 'hidden')
            },
            error: function () {
                alert('Error');
            }
        });

    });

    var beginTime = $("#datemin")
    var endTime = $("#datemax")
    var myname = $('.name1').val();
    var cflxdh = $('.cflxdh').val();

    //点击查找按钮
    $('.findBtn1').click(function () {
        myname = $('.name1').val();
        cflxdh = $('.cflxdh').val();
        var index = 0;
        $('#studebntList').html("<div class='loading'></div>");
        $.ajax({
            url: '<%=path%>/DrivingSys/getPage1?pindex=0&name=' + myname + '&cflxdh=' + cflxdh + '&beginTime=' + beginTime.val() + '&endTime=' + endTime.val(),
            type: "get",
            dataType: "json",
            success: function (res) {
                $('#studebntList').html(myTemplate(res));
                $('#totalPage').val(res.pb);
            },
            error: function () {
                alert('Error');
            }
        });

    })

    $('.indexPage').click(function () {
        var index = 0
        myname = $('.name1').val();
        $('#index').val(0)
        $.ajax({
            url: '<%=path%>/DrivingSys/getPage1?pindex=' + index + '&cflxdh=' + cflxdh + '&name=' + myname + '&beginTime=' + beginTime.val() + '&endTime=' + endTime.val(),
            type: "get",
            dataType: "json",
            success: function (json) {
                $('#studebntList').html(myTemplate(json));
            },
            error: function () {
                alert('Error');
            }
        });
    })


    $('.endPage').click(function () {
        myname = $('.name1').val();
        var index = parseInt($('#totalPage').val())
        $('#index').val(index)
        $.ajax({
            url: '<%=path%>/DrivingSys/getPage1?pindex=' + index + '&cflxdh=' + cflxdh + '&name=' + myname + '&beginTime=' + beginTime.val() + '&endTime=' + endTime.val(),
            type: "get",
            dataType: "json",
            success: function (json) {
                $('#studebntList').html(myTemplate(json));
            },
            error: function () {
                alert('Error');
            }
        });
    })


    $('.nextPage').click(function () {
        myname = $('.name1').val();
        var total = parseInt($('#totalPage').val())
        if ($('#index').val() < total) {
            var index = $('#index').val() - 0 + 1
            $('#index').val(index)
            $.ajax({
                url: '<%=path%>/DrivingSys/getPage1?pindex=' + index + '&cflxdh=' + cflxdh + '&name=' + myname + '&beginTime=' + beginTime.val() + '&endTime=' + endTime.val(),

                type: "get",
                dataType: "json",
                success: function (json) {
                    $('#studebntList').html(myTemplate(json));
                },
                error: function () {
                    alert('Error');
                }
            });
        } else {
            alert("已经到尾页了！")
        }
    })


    $('.prevPage').click(function () {
        myname = $('.name1').val();
        if ($('#index').val() != '0') {
            var index = $('#index').val() - 0 - 1
            $('#index').val(index)
            $.ajax({
                url: '<%=path%>/DrivingSys/getPage1?pindex=' + index + '&cflxdh=' + cflxdh + '&name=' + myname + '&beginTime=' + beginTime.val() + '&endTime=' + endTime.val(),
                type: "get",
                dataType: "json",
                success: function (json) {
                    $('#studebntList').html(myTemplate(json));
                },
                error: function () {
                    alert('Error');
                }
            });
        } else {
            alert("已经是首页了")
        }
    })
    //单击选中
    $(document).on('click', '#studebntList tr td', function () {
        if ($(this).parent().find(".fir input:checkbox").is(':checked')) {
            $(this).parent().find(".fir input:checkbox").removeAttr("checked");
        } else {
            $(this).parent().find(".fir input:checkbox").attr("checked", ":checked")
        }
    })

    //由于和input:checkbox冲突，在选择一次
    $("#studebntList tr td .check2:checkbox").live('click', function () {
        if ($(this).is('.check2:checked')) {
            $(this).removeAttr("checked");
        } else {
            $(this).attr("checked", ".check2:checked")
        }
    })

    //双击
    $(document).on('dblclick', '#studebntList tr td:not(td:first-child)', function () {
        $(this).parent().find(".fir input:checkbox").attr("checked", ":checked")
        $('.subtn1').click();
    })


    //弹出框的全选
    $(document).on('click', '#all_Check', function () {
        if ($(this).is(':checked')){
            $('.fir .check2').attr("checked",true);
        }
        else {
            $('.fir .check2').attr("checked",false);
        }
    })

    $('.copyDate').click(function () {
        var jy_data = $('.rcfcfwz').val()
        var fz_data = $('.rcfremark').val()

        $('.rcfcfwz').each(function (i) {
            $(this).val(jy_data);
        })

        $('.rcfremark').each(function (i) {
            $(this).val(fz_data);
        })
    })
    //返回
    function back() {
        parent.closeSelectCard()
        //location = '<%=path%>/DrivingSys/queryChangecoachThree/look.action?state=first';
    }
</script>
<%@ include file="/WEB-INF/JSP/ajax.jsp" %>
</html>